package lgy.kunpeng.homework;

import java.util.Scanner;

public class op09 {
    public static void main(String[] args) {
        int year;
        int mon;
        int day;
        int num=0;
        int Day[]={0,31,28,31,30,31,30,31,31,30,31,30};
        Scanner input = new Scanner(System.in);
        System.out.println("输入年份");
        year = input.nextInt();
        System.out.println("输入月份");
        mon = input.nextInt();
        System.out.println("输入日期");
        day = input.nextInt();
        for(int i=1900;i<year;i++) {
            if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {
                num += 366;
            } else {
                num += 365;
            }
        }
        if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {
            Day[2] = 28;
        } else {
            Day[2] = 29;
        }
        for(int i=0;i<mon;i++) {
            num+=Day[i];
        }
        num+=(day-1);
        System.out.println(year+"年"+mon+"月"+day+"日距离1900年1月1日有"+num+"天");
    }
}
